/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package ourMessage;

import ChateoFacadeNI.*;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.InetAddress;
import java.net.Socket;

 
public class ConnexionTCPClient extends Thread{
    private InetAddress addrClient;
    private int portClient;
    private Socket sockClient;
    private FacadeNI facada;
    
    public ConnexionTCPClient(InetAddress addr, int port, FacadeNI facada){
        this.addrClient=addr;
        this.portClient=port;
        this.facada=facada;
        
        super.start();
    }
    
    public void run(){
        try {
                    this.sockClient = new Socket(addrClient, portClient);

                    //System.out.println("In " + ComunicaTCPServer.class.getName() + " : Accepted a client");
                    InputStreamReader inReader = new InputStreamReader(sockClient.getInputStream());
                    OutputStreamWriter outWriter = new OutputStreamWriter(sockClient.getOutputStream());

                } catch (IOException ex) {
                    System.err.println("Erreur in : " + ConnexionTCPClient.class.getName().toString() + " : " + ex.getMessage());
                }
        }
}
